import '@/icons' // icon
import '@/permission' // permission control
// global css
import '@/styles/index.scss'
// element-ui
import ElementUI from 'element-ui'
import locale from 'element-ui/lib/locale/lang/zh-CN'
import 'element-ui/lib/theme-chalk/index.css'
// A modern alternative to CSS resets，浏览器兼容样式表
import 'normalize.css/normalize.css'

// bpmn 相关依赖
import 'bpmn-js/dist/assets/diagram-js.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css'
// 右侧工具栏以及编辑节点的样式
import 'bpmn-js-properties-panel/dist/assets/bpmn-js-properties-panel.css'

// 图标文件
import './assets/iconfont/iconfont.js'
// 百度地图
import BaiduMap from 'vue-baidu-map'
// 表格固定
import horizontalScroll from 'el-table-horizontal-scroll'

import Vue from 'vue'
// import VueAMap from 'vue-amap'
import App from './App'
import router from './router'
import store from './store'

import "@/styles/flex.scss"
import TkRegister from "@/components/TkCommonPage/register"
// import register from '@/components/ik/register'
/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 * Currently MockJs will be used in the production environment,
 * please remove it before going online ! ! !
 */
if (process.env.NODE_ENV === 'production') {
  const { mockXHR } = require('../mock')
  mockXHR()
}

// ElementUI 注册
ElementUI.Dialog.props.lockScroll.default = false
// Vue.prototype.setsocket = wsConnection
// Vue.prototype.$axios = axios
Vue.use(ElementUI, { locale })
Vue.config.productionTip = false
Vue.config.devtools = true
// Vue.mixin(register)
Vue.mixin(TkRegister)
Vue.use(horizontalScroll)
// 百度地图
Vue.use(BaiduMap, { ak: 'AybzVSYI1722A8tQIvxxSnUQ8cG6PHWi' })
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app")

